/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;

/** Generated Model for hrm_illness
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_illness extends PO implements I_hrm_illness, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130612L;

    /** the default Constructor */
    public X_hrm_illness(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_illness (Properties ctx, int hrm_illness_ID, String trxName)
    {
      super (ctx, hrm_illness_ID, trxName);
      /** if (hrm_illness_ID == 0)
        {
			sethrm_absenceType (null);
// 6
			sethrm_illness_ID (0);
			setName (null);
			setProcessed (false);
// N
			setProcessing (false);
// N
        } */
    }

    /** Load Constructor */
    public X_hrm_illness (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_illness[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set averagecalculation.
		@param averagecalculation averagecalculation	  */
	public void setaveragecalculation (String averagecalculation)
	{
		set_Value (COLUMNNAME_averagecalculation, averagecalculation);
	}

	/** Get averagecalculation.
		@return averagecalculation	  */
	public String getaveragecalculation () 
	{
		return (String)get_Value(COLUMNNAME_averagecalculation);
	}

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Period getC_Period() throws RuntimeException
    {
		return (org.compiere.model.I_C_Period)MTable.get(getCtx(), org.compiere.model.I_C_Period.Table_Name)
			.getPO(getC_Period_ID(), get_TrxName());	}

	/** Set Period.
		@param C_Period_ID 
		Period of the Calendar
	  */
	public void setC_Period_ID (int C_Period_ID)
	{
		if (C_Period_ID < 1) 
			set_Value (COLUMNNAME_C_Period_ID, null);
		else 
			set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
	}

	/** Get Period.
		@return Period of the Calendar
	  */
	public int getC_Period_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	public org.eevolution.model.I_HR_Department getHR_Block() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Block_ID(), get_TrxName());	}

	/** Set HR Block.
		@param HR_Block_ID HR Block	  */
	public void setHR_Block_ID (int HR_Block_ID)
	{
		if (HR_Block_ID < 1) 
			set_Value (COLUMNNAME_HR_Block_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Block_ID, Integer.valueOf(HR_Block_ID));
	}

	/** Get HR Block.
		@return HR Block	  */
	public int getHR_Block_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Block_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.eevolution.model.I_HR_Department getHR_Department() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Department_ID(), get_TrxName());	}

	/** Set Payroll Department.
		@param HR_Department_ID Payroll Department	  */
	public void setHR_Department_ID (int HR_Department_ID)
	{
		if (HR_Department_ID < 1) 
			set_Value (COLUMNNAME_HR_Department_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID));
	}

	/** Get Payroll Department.
		@return Payroll Department	  */
	public int getHR_Department_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** hrm_absenceType AD_Reference_ID=1000015 */
	public static final int HRM_ABSENCETYPE_AD_Reference_ID=1000015;
	/** Vacation = 1 */
	public static final String HRM_ABSENCETYPE_Vacation = "1";
	/** Leave without salary = 2 */
	public static final String HRM_ABSENCETYPE_LeaveWithoutSalary = "2";
	/** Education leave = 3 */
	public static final String HRM_ABSENCETYPE_EducationLeave = "3";
	/** Shorttime leave = 4 */
	public static final String HRM_ABSENCETYPE_ShorttimeLeave = "4";
	/** Not doc = 5 */
	public static final String HRM_ABSENCETYPE_NotDoc = "5";
	/** Illness = 6 */
	public static final String HRM_ABSENCETYPE_Illness = "6";
	/** Dayoff = 7 */
	public static final String HRM_ABSENCETYPE_Dayoff = "7";
	/** Absenteeism = 8 */
	public static final String HRM_ABSENCETYPE_Absenteeism = "8";
	/** Business Trip = 9 */
	public static final String HRM_ABSENCETYPE_BusinessTrip = "9";
	/** Education business trip = 10 */
	public static final String HRM_ABSENCETYPE_EducationBusinessTrip = "10";
	/** Review from vacation = 11 */
	public static final String HRM_ABSENCETYPE_ReviewFromVacation = "11";
	/** Review from trip = 12 */
	public static final String HRM_ABSENCETYPE_ReviewFromTrip = "12";
	/** Pregnancy = 13 */
	public static final String HRM_ABSENCETYPE_Pregnancy = "13";
	/** Child Care = 14 */
	public static final String HRM_ABSENCETYPE_ChildCare = "14";
	/** Change business trip = 15 */
	public static final String HRM_ABSENCETYPE_ChangeBusinessTrip = "15";
	/** Set hrm_absenceType.
		@param hrm_absenceType hrm_absenceType	  */
	public void sethrm_absenceType (String hrm_absenceType)
	{

		set_Value (COLUMNNAME_hrm_absenceType, hrm_absenceType);
	}

	/** Get hrm_absenceType.
		@return hrm_absenceType	  */
	public String gethrm_absenceType () 
	{
		return (String)get_Value(COLUMNNAME_hrm_absenceType);
	}

	/** Set hrm_illness.
		@param hrm_illness_ID hrm_illness	  */
	public void sethrm_illness_ID (int hrm_illness_ID)
	{
		if (hrm_illness_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_illness_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_illness_ID, Integer.valueOf(hrm_illness_ID));
	}

	/** Get hrm_illness.
		@return hrm_illness	  */
	public int gethrm_illness_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_illness_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Close Document.
		@param IsCloseDocument 
		Close Document (process)
	  */
	public void setIsCloseDocument (String IsCloseDocument)
	{
		set_Value (COLUMNNAME_IsCloseDocument, IsCloseDocument);
	}

	/** Get Close Document.
		@return Close Document (process)
	  */
	public String getIsCloseDocument () 
	{
		return (String)get_Value(COLUMNNAME_IsCloseDocument);
	}

	/** Set Name.
		@param Name 
		Alphanumeric identifier of the entity
	  */
	public void setName (String Name)
	{
		set_Value (COLUMNNAME_Name, Name);
	}

	/** Get Name.
		@return Alphanumeric identifier of the entity
	  */
	public String getName () 
	{
		return (String)get_Value(COLUMNNAME_Name);
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), getName());
    }

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Process Now.
		@param Processing Process Now	  */
	public void setProcessing (boolean Processing)
	{
		set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
	}

	/** Get Process Now.
		@return Process Now	  */
	public boolean isProcessing () 
	{
		Object oo = get_Value(COLUMNNAME_Processing);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}
}